<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>悦听音乐播放器</title>
    <script src="js/axios.js"></script>
    <script src="js/vue.js"></script>
    <link rel="stylesheet" href="css/index.css"/>
    <script src="json/mymusic.js"></script>
</head>
<body >
<div class="wrap">
    <!-- 播放器主体区域 -->
    <div class="play_wrap" id="player">
        <div class="search_bar">
            <img src="images/player_title.png" alt="" />
            <!-- 搜索歌曲 -->
            <input type="text" autocomplete="off"
                   v-model="query"
                   @keyup.enter="searchMusic"
                   placeholder="输入搜索信息并回车"
            />
        </div>
        <div class="center_con">
            <!-- 搜索歌曲列表 -->
            <div class="song_wrapper">
                <ul class="song_list">
                    <li v-for="(item,index) in musicList"><!--循环出来-->
                        <!--将音乐的id传过去-->
                        <a href="javascript:;" @click="playMusic(item.id)"></a>
                        <b >{{item.name}}</b><!--歌曲名-->
                        <span v-show="item.mvid!=0" @click="playMV(item.mvid)"><i></i></span>
                    </li>
                </ul>
                <img src="images/line.png" class="switch_btn" alt="">
            </div>
            <!-- 歌曲信息容器 -->
            <!-- class="player_con" class="playing" -->
            <div class="player_con" :class="{playing:isplaying}"><!--通过isplaying的真假播放动画-->
                <img src="images/player_bar.png" class="play_bar" />
                <!-- 黑胶碟片 -->
                <img src="images/disc.png" class="disc autoRotate" />
                <img :src="picurl" class="cover autoRotate" /><!--显示歌曲图片路径-->
            </div>
            <!-- 评论容器 -->
            <div class="comment_wrapper">

                    <h5 th:text="${username}"></h5>


                <h5 class="title">热门留言</h5>
                <div class="comment_list">
                    <dl v-for="(item,index) in remarkList">
                        <dt><img :src="item.user.avatarUrl" alt=""></dt>
                        <dd class="name" v-text="item.user.nickname"></dd>
                        <dd class="detail">
                            {{item.content}}
                        </dd>
                    </dl>
                </div>
                <img src="images/line.png" class="right_line">
            </div>
        </div>
        <div class="audio_con">
            <!--musicurl显示音乐的地址-->
            <audio ref="audio"  @play="play" @pause="pause" :src="musicurl" controls autoplay loop class="myaudio"></audio>
        </div>
        <div class="video_con"  v-if="isPlayMV"  ><!--isPlayMV的真假来控制显示视频-->
            <video :src="mvurl" poster="images/1.jpg" controls="controls"></video>
            <div class="mask" @click="closeMV">关闭</div><!--关闭mv-->
        </div>
    </div>
</div>
</body>
</html>